package integer;

public class IntegerDemo1 {
    public static void main(String[] args) {
        int num = 128;
        Integer i1 = Integer.valueOf(num);
        Integer i2 = Integer.valueOf(num);

        System.out.println(i1==i2);
        System.out.println(i1.equals(i2));


        double dou = 666.666;

        Double d1 = Double.valueOf(dou);
        Double d2 = Double.valueOf(dou);

        System.out.println(d1==d2);
        System.out.println(d1.equals(d2));

        int in = i1.intValue();
        System.out.println(in);
        double d = i1.doubleValue();
        System.out.println(d);

        int imax = Integer.MAX_VALUE;
        int imin = Integer.MIN_VALUE;
        System.out.println(imax);
        System.out.println(imin);

        String line = "123";
//        String line = "123.123"; //不能解析为整数

        num = Integer.parseInt(line);
        System.out.println(num);

        d = Double.parseDouble(line);
        System.out.println(d);





    }
}
